# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributer: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>

pkgname=libgme
pkgver=0.6.3
pkgrel=4
pkgdesc='Video game music file emulation/playback library'
arch=('loong64' 'x86_64')
url='https://bitbucket.org/mpyne/game-music-emu'
license=('LGPL')
depends=('gcc-libs' 'glibc' 'zlib')
makedepends=('cmake' 'ninja')
source=("https://bitbucket.org/mpyne/game-music-emu/downloads/game-music-emu-$pkgver.tar.xz")
sha256sums=('aba34e53ef0ec6a34b58b84e28bf8cfbccee6585cebca25333604c35db3e051d')
validpgpkeys=(5406ECE83665DA9D201D35720BAF0C9C7B6AE9F2) # Michael Pyne <mpyne@kde.org>

build() {
  cmake -S game-music-emu-$pkgver -B build -G Ninja -DCMAKE_INSTALL_PREFIX='/usr' -DCMAKE_BUILD_TYPE=Release -DENABLE_UBSAN=off
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
